]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mixer-control: Let sink update handle active output change
authorGuido Günther <agx@sigxcpu.org>
Sun, 4 Jan 2026 12:07:29 +0000 (13:07 +0100)
committerSimon McVittie <smcv@debian.org>
Wed, 28 Jan 2026 13:25:18 +0000 (13:25 +0000)
A signal is emitted when the output changes so don't set it right away
as the stream might change port.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Origin: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31
Bug: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/34
Bug-Debian: https://bugs.debian.org/1126514
Applied-upstream: gnome-shell 50, commit:798230599950607ec285daecd070f5bcb28580e4

Gbp-Pq: Topic libgvc
Gbp-Pq: Name mixer-control-Let-sink-update-handle-active-output-change.patch

subprojects/gvc/gvc-mixer-control.c

index 74f9193a166a89920e8b07a4ebdc4a23fdf8b209..45ae3144764b00fdfa626ec21b30f70b9e6f4682 100644 (file)
@@ -639,23 +639,11 @@ gvc_mixer_control_change_output (GvcMixerControl *control,
 
         /* Finally if we are not on the correct stream, swap over. */
         if (stream != default_stream) {
-                GvcMixerUIDevice* device;
-
                 g_debug ("Attempting to swap over to stream %s ",
                          gvc_mixer_stream_get_description (stream));
-                if (gvc_mixer_control_set_default_sink (control, stream)) {
-                        device = gvc_mixer_control_lookup_device_from_stream (control, stream);
-                        g_signal_emit (G_OBJECT (control),
-                                       signals[ACTIVE_OUTPUT_UPDATE],
-                                       0,
-                                       gvc_mixer_ui_device_get_id (device));
-                } else {
-                        /* If the move failed for some reason reset the UI. */
-                        device = gvc_mixer_control_lookup_device_from_stream (control, default_stream);
-                        g_signal_emit (G_OBJECT (control),
-                                       signals[ACTIVE_OUTPUT_UPDATE],
-                                       0,
-                                       gvc_mixer_ui_device_get_id (device));
+                if (!gvc_mixer_control_set_default_sink (control, stream)) {
+                        g_warning ("Failed to set default sink from output %s",
+                                   gvc_mixer_ui_device_get_description (output));
                 }
         }
 }